var lsturl = "";

//h回到顶部
function ToTop(objId) {
	var oTop = document.getElementById(objId);
	var screenw = document.documentElement.clientWidth || document.body.clientWidth;
	var screenh = document.documentElement.clientHeight || document.body.clientHeight;

	window.onscroll = function() {
		var scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
		if(scrolltop > screenh) {
			oTop.style.display = "block";
			oTop.style.right = oTop.offsetWidth / 3 + "px";
			oTop.style.bottom = oTop.offsetHeight * 1.5 + $(".mui-bar mui-bar-tab").height() + "px";
		} else {
			oTop.style.display = "none";
		}
	}
	
	var istop=true;
	var timer=null;
	/*window.onscroll=function(){
		if(!istop)
		{
			window.clearInterval(timer);
			
		}
		istop=false;
	}*/
	oTop.onclick = function() {
	  timer=window.setInterval(function(){
			var osTop=document.documentElement.scrollTop = document.body.scrollTop;
			var ispeed=Math.floor(-osTop/5) ;
			document.documentElement.scrollTop = document.body.scrollTop =osTop+ispeed;
			istop=true;
			if(osTop==0)
			{
				
				window.clearInterval(timer);
			}
		},30);
		
	 }
}